package com.zzx.boot.entity.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

/**
 * @author tan
 * @version 1.0
 * @date 2023/7/10 17:03
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AddCommentDto {

    @NotNull(message = "评论id不能为空")
    private Long fid;
    @NotNull(message = "文章id不能为空")
    private Long postId;
    @NotNull(message = "评论内容不能为空")
    @Length(min = 1,message = "评论内容不能为空")
    private String data;

}
